<%--
  Created by IntelliJ IDEA.
  User: King
  Date: 2020/10/10
  Time: 17:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>个人资料</title>

    <link rel="shortcut icon" href="favicon.ico">
    <link href="${pageContext.request.contextPath}/static/Hplus/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/Hplus/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/Hplus/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/Hplus/css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row animated fadeInRight">
        <div class="col-sm-4">
            <div class="ibox-content text-center">
                <h1>${sessionScope.user.name}</h1>
                <div class="m-b-sm">
                    <img alt="image" class="img-circle" src="${pageContext.request.contextPath}/static/Hplus/img/a8.jpg">
                </div>
                <p class="font-bold">${sessionScope.user.role.name}</p>
            </div>
        </div>
    </div>

</div>

<!-- 全局js -->
<script src="${pageContext.request.contextPath}/static/Hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/static/Hplus/js/bootstrap.min.js?v=3.3.6"></script>



<!-- 自定义js -->
<script src="${pageContext.request.contextPath}/static/Hplus/js/content.js?v=1.0.0"></script>


<!-- Peity -->
<script src="${pageContext.request.contextPath}/static/Hplus/js/plugins/peity/jquery.peity.min.js"></script>

<!-- Peity -->
<script src="${pageContext.request.contextPath}/static/Hplus/js/demo/peity-demo.js"></script>

<script src="${pageContext.request.contextPath}/static/Hplus/js/plugins/layer/laydate/laydate.js"></script>
<script>

    function getLocalTime(date) {
        y = date.getFullYear();
        m = ("0" + (date.getMonth() + 1)).slice(-2);
        d = ("0" + date.getDate()).slice(-2);
        return y + "-" + m + "-" + d;
    }

    $(function(){
        var birthday = "${sessionScope.user.birthday}";
        $("#hello").val(getLocalTime(new Date(birthday)));
        $("#sex").val("${sessionScope.user.sex}");
    });

    //外部js调用
    laydate({
        elem: '#hello', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        event: 'focus' //响应事件。如果没有传入event，则按照默认的click
    });

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: '1900-00-00 00:00:00', //设定最小日期为当前日期
        max: laydate.now(), //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: '1900-00-00 00:00:00', //设定最小日期为当前日期
        max: laydate.now(), //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
</script>
</body>

</html>

